package com.atguigu.yygh.repository;

import com.atguigu.yygh.model.hosp.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author kabuda
 * @create 2023-02-25 20:00
 */
@Repository
public interface HospitalRepository extends MongoRepository<Hospital,String> {
    //根据规范定义名称，SpringData自动帮我们生成sql
    Hospital getHospitalByHoscode(String hoscode);

    List<Hospital> findByHosname(String hosname);
}
